<?php

/**
 * Created by IntelliJ IDEA.
 * User: keke
 * Date: 18-10-27
 * Time: 下午12:24
 */
require_once "../congfig/config.php";
require_once "../lib/common.php";
$pid = $_GET['id'];
$sql = "UPDATE proinfor SET pRank ='6' where id='$pid'";
$sql = "SELECT goodpro FROM WHERE pid ='$pid' ";
$query = $conn->query($sql);
$result = $query->fetch_array();
$filepa = $result['pic'];
$filepa = filepath . "$filepa";
if (file_exists($filepa)) {
    unlink($filepa);
}
$query = $conn->query($sql);
if($query)
{
    exit(jsoncall(1,"更改优秀项目成功"));
}
exit(jsoncall(-1,"更改优秀项目失败"));
